//未完成垫付任务模块
$.ajaxSetup({
	url:$CONFIG.baseUrl+"/api/order/getOrderListByType",
	type: 'post',
	beforeSend:function(x){
		x.setRequestHeader("Authorization",plus.storage.getItem('token'));
	},
	errror: function(error){
		console.log('error')
	}
});


function forfun(m,data){
	var n = '<div class="to-be-operated">\
                    <div>\
                        <img src="images/img_taobao.png">\
                        <p style="font-size: 12px;">#1</p>\
                        <time style="font-size: 12px;">#2</time>\
                    </div>\
                    <div>\
                        <img src="http://tbk.tutew.com/#3">\
                        <div class="content-money">\
                            <p>佣金:<span>#4</span></p>\
                            <p>垫资#5元<span>#6</span></p>\
                        </div>';
    var nm = n+m;
	var t="";
	for(var i=0;i<data.data.length;i++){
        	t+=nm.replace("#1",data.data[i].orderNum)
        		.replace("#2",data.data[i].orderCt.substring(0,10))
        		.replace("#3",data.data[i].goods1Pic)
        		.replace("#4",0)
        		.replace("#5",0)
        		.replace("#6",function(){
        			if(data.data[i].hpType == 1)return "普通好评";
        			if(data.data[i].hpType == 2)return "文字好评";
        			if(data.data[i].hpType == 3)return "图片好评";
        			if(data.data[i].hpType == 4)return "视频好评";
        		}).replace("#7",data.data[i].orderId)
        }
	return t;
}

